package com.start.common.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.start.common.entity.StartBaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
@Schema(name = "BaseTreeModel", description = "基本树形结构")
public abstract class StartBaseTreeModel<T extends StartBaseTreeModel<T>> extends StartBaseEntity implements TreeModel<T>, Serializable {

    @Schema(name = "父级id")
    private String parentId;
    @Schema(name = "子级")
    @TableField(exist = false)
    private List<T> children;

}
